package com.test.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author:huang
 * @Date: Created in 2021/5/14 16:15
 */
@Controller
@RequestMapping("/c")
public class NoViewController {

    @GetMapping("/hello2")
    public String hello( Model model) {
        model.addAttribute("msg", "小婷婷" );
        //重定向 重定向不能进入WEB-INF下的页面
        System.out.println("------------");
        return "redirect:/index.jsp";

    }
}
